<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style>
      .span-01 {
        display: inline-block;
        width: 200px;
      }
    </style>
  </head>
  <body>
    <span class="span-01">我是span</span>

    <button onclick="console.log(this, event)">计数1</button>

    <button id="btn-003">计数3</button>
    <script>
      const button = document.getElementById('btn-003');
      button.onclick = function (event) {
        console.log(this);
        console.log(event);
      };
    </script>

    <button id="btn-004">计数4</button>
    <script>
      const button2 = document.getElementById('btn-004');

      function onClick1(event) {
        console.log('onClick1 this', this);
        console.log('onClick1 event', event);
      }
      function onClick2(event) {
        console.log('onClick2 this', this);
        console.log('onClick2 event', event);
      }
      button2.addEventListener('click', onClick2);
      button2.addEventListener('click', onClick1);
    </script>
  </body>
</html>
